<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Flex容器</title>
    <style>
      .father {
        width: 500px;
        height: 500px;
        background-color: pink;
        /* flex容器 */
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
      }

      /* .father div {
        width: 100px;
        height: 100px;
      } */

      .one {
        background-color: red;
        width: 100px;
        height: 100px;
      }

      .two {
        background-color: green;
        align-self: flex-start;
        height: 100px;
        /* 设置伸缩比 */
        flex: 1;
      }

      .three {
        background-color: blue;
        width: 100px;
        height: 100px;
      }
    </style>
  </head>
  <body>
    <div class="father">
      <div class="one">1</div>
      <div class="two">2</div>
      <div class="three">3</div>
    </div>
  </body>
</html>
